//五一倒计时
function countDown(time) {
    let nowTime = +new Date(); //返回的是当前时间总的毫秒数
    let inputTime = +new Date(time); //返回输入时间总的毫秒数
    let times = (inputTime - nowTime) / 1000; //times是剩余时间
    let d = parseInt(times / 60 / 60 / 24); //天
    let h = parseInt(times / 60 / 60 % 24); //时
    let m = parseInt(times / 60 % 60); //分
    let s = parseInt(times % 60); //秒
    let str = d + '天' + h + '时' + m + '分' + s + '秒';
    app.innerHTML = str
}
setInterval(function () {
    countDown('2021-5-1');
}, 1000)